<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery-3.3.1.min.js"></script>
</head>
<body>
    <script>
        $(function () {
            /* //获取myinput的value值
             var val = $("#myinput").val();
             alert(val)*/

            //var val2 = $("#myinput").val("李四");
            //获取标签体内容
            /*var html = $("#mydiv").html();
            alert(html);*/
            // var val = $("#mydiv").html("zzz");

            //获取文本内容

           /* var text = $("#mydiv").text();
            alert(text)*/
            $("#mydiv").text("ddd");


        })




    </script>


    <input id="myinput" type="text" name="user" value="张三"><br/>
    <div id="mydiv"><p><a href="#">标题标签</a> </p></div>
</body>
</html>